#!/usr/bin/python
# -*- coding: utf-8 -*-

import sys, traceback, Ice, Glacier2

class Client (Ice.Application):
    def run (self, argv):
        self.shutdownOnInterrupt()
        obj = self.communicator().stringToProxy('verifier:default -p 10000')
        prx = Glacier2.PermissionsVerifierPrx.checkedCast(obj)
        ret, err = prx.checkPermissions('usuario', 'password')
        if ret:
            print 'Usuario validado.'
        else:
            print 'Usuario no validado.'
        self.communicator().waitForShutdown()
        return 0

Client().main(sys.argv)
